-
Notifications
You must be signed in to change notification settings - Fork 79
chore(cli): remove unused backend flag #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR removes the unused Entity relationship diagram for CLI command options after backend flag removalerDiagram
CLI_COMMANDS {
string name
string[] options
}
OPTION {
string name
string value_type
string default_value
string description
}
CLI_COMMANDS ||--o{ OPTION : has
Class diagram for updated desktop.Client methods after backend flag removalclassDiagram
class Client {
+List()
+ListOpenAI()
+Chat(model, prompt string, imageURLs []string, outputFunc func(string), shouldUseMarkdown bool) error
+ChatWithContext(ctx context.Context, model, prompt string, imageURLs []string, outputFunc func(string), shouldUseMarkdown bool) error
-doRequest(method, path string, body io.Reader) (*http.Response, error)
-doRequestWithAuth(method, path string, body io.Reader) (*http.Response, error)
-doRequestWithAuthContext(ctx context.Context, method, path string, body io.Reader) (*http.Response, error)
}
Class diagram for updated CLI command functions after backend flag removalclassDiagram
class run_go {
+generateInteractiveWithReadline(cmd, desktopClient, model string) error
+generateInteractiveBasic(cmd, desktopClient, model string) error
+chatWithMarkdown(cmd, desktopClient, model, prompt string) error
+chatWithMarkdownContext(ctx, cmd, desktopClient, model, prompt string) error
}
class list_go {
+newListCmd() *cobra.Command
+listModels(openai bool, desktopClient *desktop.Client, quiet bool, jsonFormat bool, modelFilter string) (string, error)
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes the unused backend flag and related functionality from the CLI commands. The changes revert a previous addition that allowed specifying different backends (llama.cpp, openai, vllm) for model operations.
Key changes:
- Removed the
backendcommand-line flag fromrunandlistcommands - Eliminated backend validation and OpenAI API key handling logic
- Simplified client methods by removing backend and API key parameters
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/cli/docs/reference/docker_model_run.yaml | Removed backend option from run command documentation |
| cmd/cli/docs/reference/docker_model_list.yaml | Removed backend option from list command documentation |
| cmd/cli/desktop/desktop.go | Simplified client methods by removing backend/apiKey parameters and related logic |
| cmd/cli/commands/run.go | Removed backend flag, validation, and parameter passing from run command |
| cmd/cli/commands/list.go | Removed backend flag, validation, and parameter passing from list command |
| cmd/cli/commands/backend.go | Deleted entire file containing backend validation utilities |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary of ChangesHello @doringeman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on cleaning up the command-line interface by removing the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request reverts a previous change, removing the --backend flag and its associated logic from the CLI commands and client methods. The changes are well-contained and correctly remove the functionality from run and list commands, their documentation, and the underlying client API calls. The code is cleaner and simpler as a result. I have one minor suggestion to remove a stale comment that is no longer relevant after these changes.
Reverts docker/model-cli#126. Signed-off-by: Dorin Geman <[email protected]>
7cb754e to
695c2b8
Compare
|
Should have checked with @ilopezluna to be sure here... Mea cupla clicking merge |
Reverts docker/model-cli#126.
Summary by Sourcery
Remove the deprecated --backend flag and related backend parameters across CLI commands and client methods, simplifying API calls to use a unified endpoint and updating documentation accordingly.
Enhancements:
Documentation: